{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 2017年分省水资源分析\n",
    "### 数据源\n",
    "国家统计局2017分省水资源总量、供水总量、用水总量、人均用水量、GDP数据"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 713,
   "metadata": {},
   "outputs": [],
   "source": [
    "import pandas as pd\n",
    "import csv, os\n",
    "df = pd.read_csv('C:/Users/Alyfu/Desktop/fs_water_supply.csv',encoding='gbk')     "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 714,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>地区</th>\n",
       "      <th>供水总量</th>\n",
       "      <th>用水总量</th>\n",
       "      <th>人均用水量</th>\n",
       "      <th>人均日生活用水量</th>\n",
       "      <th>水资源总量</th>\n",
       "      <th>GDP</th>\n",
       "      <th>居民消费水平</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>北京</td>\n",
       "      <td>39.5</td>\n",
       "      <td>39.5</td>\n",
       "      <td>181.88</td>\n",
       "      <td>18.83</td>\n",
       "      <td>29.8</td>\n",
       "      <td>28014.94</td>\n",
       "      <td>52912.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>天津</td>\n",
       "      <td>27.5</td>\n",
       "      <td>27.5</td>\n",
       "      <td>176.33</td>\n",
       "      <td>9.28</td>\n",
       "      <td>13.0</td>\n",
       "      <td>18549.19</td>\n",
       "      <td>38975.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>河北</td>\n",
       "      <td>181.6</td>\n",
       "      <td>181.6</td>\n",
       "      <td>242.30</td>\n",
       "      <td>16.13</td>\n",
       "      <td>138.3</td>\n",
       "      <td>34016.32</td>\n",
       "      <td>15893.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>山西</td>\n",
       "      <td>74.9</td>\n",
       "      <td>74.9</td>\n",
       "      <td>202.87</td>\n",
       "      <td>9.41</td>\n",
       "      <td>130.2</td>\n",
       "      <td>15528.42</td>\n",
       "      <td>18132.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>内蒙古</td>\n",
       "      <td>188.0</td>\n",
       "      <td>188.0</td>\n",
       "      <td>744.68</td>\n",
       "      <td>8.26</td>\n",
       "      <td>309.9</td>\n",
       "      <td>16096.21</td>\n",
       "      <td>23909.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>辽宁</td>\n",
       "      <td>131.1</td>\n",
       "      <td>131.1</td>\n",
       "      <td>299.77</td>\n",
       "      <td>25.01</td>\n",
       "      <td>186.3</td>\n",
       "      <td>23409.24</td>\n",
       "      <td>24866.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>吉林</td>\n",
       "      <td>126.7</td>\n",
       "      <td>126.7</td>\n",
       "      <td>464.95</td>\n",
       "      <td>10.46</td>\n",
       "      <td>394.4</td>\n",
       "      <td>14944.53</td>\n",
       "      <td>15083.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>黑龙江</td>\n",
       "      <td>353.1</td>\n",
       "      <td>353.1</td>\n",
       "      <td>930.69</td>\n",
       "      <td>14.20</td>\n",
       "      <td>742.5</td>\n",
       "      <td>15902.68</td>\n",
       "      <td>18859.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>上海</td>\n",
       "      <td>104.8</td>\n",
       "      <td>104.8</td>\n",
       "      <td>433.26</td>\n",
       "      <td>31.01</td>\n",
       "      <td>34.0</td>\n",
       "      <td>30632.99</td>\n",
       "      <td>53617.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>江苏</td>\n",
       "      <td>591.3</td>\n",
       "      <td>591.3</td>\n",
       "      <td>737.84</td>\n",
       "      <td>54.00</td>\n",
       "      <td>392.9</td>\n",
       "      <td>85869.76</td>\n",
       "      <td>39796.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10</th>\n",
       "      <td>浙江</td>\n",
       "      <td>179.5</td>\n",
       "      <td>179.5</td>\n",
       "      <td>319.20</td>\n",
       "      <td>35.74</td>\n",
       "      <td>895.3</td>\n",
       "      <td>51768.26</td>\n",
       "      <td>33851.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11</th>\n",
       "      <td>安徽</td>\n",
       "      <td>290.3</td>\n",
       "      <td>290.3</td>\n",
       "      <td>466.33</td>\n",
       "      <td>18.99</td>\n",
       "      <td>784.9</td>\n",
       "      <td>27018.00</td>\n",
       "      <td>17141.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12</th>\n",
       "      <td>福建</td>\n",
       "      <td>192.0</td>\n",
       "      <td>192.0</td>\n",
       "      <td>493.26</td>\n",
       "      <td>17.30</td>\n",
       "      <td>1055.6</td>\n",
       "      <td>32182.09</td>\n",
       "      <td>25969.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13</th>\n",
       "      <td>江西</td>\n",
       "      <td>248.0</td>\n",
       "      <td>248.0</td>\n",
       "      <td>538.30</td>\n",
       "      <td>12.48</td>\n",
       "      <td>1655.1</td>\n",
       "      <td>20006.31</td>\n",
       "      <td>17290.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>14</th>\n",
       "      <td>山东</td>\n",
       "      <td>209.5</td>\n",
       "      <td>209.5</td>\n",
       "      <td>210.00</td>\n",
       "      <td>38.55</td>\n",
       "      <td>225.6</td>\n",
       "      <td>72634.15</td>\n",
       "      <td>28353.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>15</th>\n",
       "      <td>河南</td>\n",
       "      <td>233.8</td>\n",
       "      <td>233.8</td>\n",
       "      <td>244.93</td>\n",
       "      <td>20.86</td>\n",
       "      <td>423.1</td>\n",
       "      <td>44552.83</td>\n",
       "      <td>17842.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>16</th>\n",
       "      <td>湖北</td>\n",
       "      <td>290.3</td>\n",
       "      <td>290.3</td>\n",
       "      <td>492.58</td>\n",
       "      <td>29.49</td>\n",
       "      <td>1248.8</td>\n",
       "      <td>35478.09</td>\n",
       "      <td>21642.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17</th>\n",
       "      <td>湖南</td>\n",
       "      <td>326.9</td>\n",
       "      <td>326.9</td>\n",
       "      <td>477.85</td>\n",
       "      <td>19.48</td>\n",
       "      <td>1912.4</td>\n",
       "      <td>33902.96</td>\n",
       "      <td>19418.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18</th>\n",
       "      <td>广东</td>\n",
       "      <td>433.5</td>\n",
       "      <td>433.5</td>\n",
       "      <td>391.10</td>\n",
       "      <td>89.68</td>\n",
       "      <td>1786.6</td>\n",
       "      <td>89705.23</td>\n",
       "      <td>30762.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>19</th>\n",
       "      <td>广西</td>\n",
       "      <td>284.9</td>\n",
       "      <td>284.9</td>\n",
       "      <td>586.03</td>\n",
       "      <td>18.36</td>\n",
       "      <td>2388.0</td>\n",
       "      <td>18523.26</td>\n",
       "      <td>16064.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20</th>\n",
       "      <td>海南</td>\n",
       "      <td>45.6</td>\n",
       "      <td>45.6</td>\n",
       "      <td>494.81</td>\n",
       "      <td>4.82</td>\n",
       "      <td>383.9</td>\n",
       "      <td>4462.54</td>\n",
       "      <td>20939.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>21</th>\n",
       "      <td>重庆</td>\n",
       "      <td>77.4</td>\n",
       "      <td>77.4</td>\n",
       "      <td>252.80</td>\n",
       "      <td>13.80</td>\n",
       "      <td>656.1</td>\n",
       "      <td>19424.73</td>\n",
       "      <td>22927.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>22</th>\n",
       "      <td>四川</td>\n",
       "      <td>268.4</td>\n",
       "      <td>268.4</td>\n",
       "      <td>324.08</td>\n",
       "      <td>25.59</td>\n",
       "      <td>2467.1</td>\n",
       "      <td>36980.22</td>\n",
       "      <td>17920.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>23</th>\n",
       "      <td>贵州</td>\n",
       "      <td>103.5</td>\n",
       "      <td>103.5</td>\n",
       "      <td>290.12</td>\n",
       "      <td>7.14</td>\n",
       "      <td>1051.5</td>\n",
       "      <td>13540.83</td>\n",
       "      <td>16349.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>24</th>\n",
       "      <td>云南</td>\n",
       "      <td>156.6</td>\n",
       "      <td>156.6</td>\n",
       "      <td>327.22</td>\n",
       "      <td>8.96</td>\n",
       "      <td>2202.6</td>\n",
       "      <td>16376.34</td>\n",
       "      <td>15831.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>25</th>\n",
       "      <td>西藏</td>\n",
       "      <td>31.4</td>\n",
       "      <td>31.4</td>\n",
       "      <td>940.77</td>\n",
       "      <td>1.11</td>\n",
       "      <td>4749.9</td>\n",
       "      <td>1310.92</td>\n",
       "      <td>10990.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>26</th>\n",
       "      <td>陕西</td>\n",
       "      <td>93.0</td>\n",
       "      <td>93.0</td>\n",
       "      <td>243.21</td>\n",
       "      <td>13.79</td>\n",
       "      <td>449.1</td>\n",
       "      <td>21898.81</td>\n",
       "      <td>18485.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>27</th>\n",
       "      <td>甘肃</td>\n",
       "      <td>116.1</td>\n",
       "      <td>116.1</td>\n",
       "      <td>443.47</td>\n",
       "      <td>5.10</td>\n",
       "      <td>238.9</td>\n",
       "      <td>7459.90</td>\n",
       "      <td>14203.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>28</th>\n",
       "      <td>青海</td>\n",
       "      <td>25.8</td>\n",
       "      <td>25.8</td>\n",
       "      <td>433.08</td>\n",
       "      <td>2.73</td>\n",
       "      <td>785.7</td>\n",
       "      <td>2624.83</td>\n",
       "      <td>18020.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>29</th>\n",
       "      <td>宁夏</td>\n",
       "      <td>66.1</td>\n",
       "      <td>66.1</td>\n",
       "      <td>974.28</td>\n",
       "      <td>3.35</td>\n",
       "      <td>10.8</td>\n",
       "      <td>3443.56</td>\n",
       "      <td>21058.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>30</th>\n",
       "      <td>新疆</td>\n",
       "      <td>552.3</td>\n",
       "      <td>552.3</td>\n",
       "      <td>2280.78</td>\n",
       "      <td>9.86</td>\n",
       "      <td>1018.6</td>\n",
       "      <td>10881.96</td>\n",
       "      <td>16736.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>31</th>\n",
       "      <td>台湾</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "     地区   供水总量   用水总量    人均用水量  人均日生活用水量   水资源总量       GDP   居民消费水平\n",
       "0    北京   39.5   39.5   181.88     18.83    29.8  28014.94  52912.0\n",
       "1    天津   27.5   27.5   176.33      9.28    13.0  18549.19  38975.0\n",
       "2    河北  181.6  181.6   242.30     16.13   138.3  34016.32  15893.0\n",
       "3    山西   74.9   74.9   202.87      9.41   130.2  15528.42  18132.0\n",
       "4   内蒙古  188.0  188.0   744.68      8.26   309.9  16096.21  23909.0\n",
       "5    辽宁  131.1  131.1   299.77     25.01   186.3  23409.24  24866.0\n",
       "6    吉林  126.7  126.7   464.95     10.46   394.4  14944.53  15083.0\n",
       "7   黑龙江  353.1  353.1   930.69     14.20   742.5  15902.68  18859.0\n",
       "8    上海  104.8  104.8   433.26     31.01    34.0  30632.99  53617.0\n",
       "9    江苏  591.3  591.3   737.84     54.00   392.9  85869.76  39796.0\n",
       "10   浙江  179.5  179.5   319.20     35.74   895.3  51768.26  33851.0\n",
       "11   安徽  290.3  290.3   466.33     18.99   784.9  27018.00  17141.0\n",
       "12   福建  192.0  192.0   493.26     17.30  1055.6  32182.09  25969.0\n",
       "13   江西  248.0  248.0   538.30     12.48  1655.1  20006.31  17290.0\n",
       "14   山东  209.5  209.5   210.00     38.55   225.6  72634.15  28353.0\n",
       "15   河南  233.8  233.8   244.93     20.86   423.1  44552.83  17842.0\n",
       "16   湖北  290.3  290.3   492.58     29.49  1248.8  35478.09  21642.0\n",
       "17   湖南  326.9  326.9   477.85     19.48  1912.4  33902.96  19418.0\n",
       "18   广东  433.5  433.5   391.10     89.68  1786.6  89705.23  30762.0\n",
       "19   广西  284.9  284.9   586.03     18.36  2388.0  18523.26  16064.0\n",
       "20   海南   45.6   45.6   494.81      4.82   383.9   4462.54  20939.0\n",
       "21   重庆   77.4   77.4   252.80     13.80   656.1  19424.73  22927.0\n",
       "22   四川  268.4  268.4   324.08     25.59  2467.1  36980.22  17920.0\n",
       "23   贵州  103.5  103.5   290.12      7.14  1051.5  13540.83  16349.0\n",
       "24   云南  156.6  156.6   327.22      8.96  2202.6  16376.34  15831.0\n",
       "25   西藏   31.4   31.4   940.77      1.11  4749.9   1310.92  10990.0\n",
       "26   陕西   93.0   93.0   243.21     13.79   449.1  21898.81  18485.0\n",
       "27   甘肃  116.1  116.1   443.47      5.10   238.9   7459.90  14203.0\n",
       "28   青海   25.8   25.8   433.08      2.73   785.7   2624.83  18020.0\n",
       "29   宁夏   66.1   66.1   974.28      3.35    10.8   3443.56  21058.0\n",
       "30   新疆  552.3  552.3  2280.78      9.86  1018.6  10881.96  16736.0\n",
       "31   台湾    NaN    NaN      NaN       NaN     NaN       NaN      NaN"
      ]
     },
     "execution_count": 714,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 715,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "['北京', '天津', '河北', '山西', '内蒙古', '辽宁', '吉林', '黑龙江', '上海', '江苏', '浙江', '安徽', '福建', '江西', '山东', '河南', '湖北', '湖南', '广东', '广西', '海南', '重庆', '四川', '贵州', '云南', '西藏', '陕西', '甘肃', '青海', '宁夏', '新疆', '台湾']\n"
     ]
    }
   ],
   "source": [
    "print(list(df.地区))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 716,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[39.5, 27.5, 181.6, 74.9, 188.0, 131.1, 126.7, 353.1, 104.8, 591.3, 179.5, 290.3, 192.0, 248.0, 209.5, 233.8, 290.3, 326.9, 433.5, 284.9, 45.6, 77.4, 268.4, 103.5, 156.6, 31.4, 93.0, 116.1, 25.8, 66.1, 552.3, nan]\n"
     ]
    }
   ],
   "source": [
    "print(list(df.供水总量))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 717,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[181.88, 176.33, 242.3, 202.87, 744.68, 299.77, 464.95, 930.69, 433.26, 737.84, 319.2, 466.33, 493.26, 538.3, 210.0, 244.93, 492.58, 477.85, 391.1, 586.03, 494.81, 252.8, 324.08, 290.12, 327.22, 940.77, 243.21, 443.47, 433.08, 974.28, 2280.78, nan]\n"
     ]
    }
   ],
   "source": [
    "print(list(df.人均用水量))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 718,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "<zip object at 0x0000020A857F73C8>\n"
     ]
    }
   ],
   "source": [
    "人均用水量 = zip(list(df.地区),list(df.人均用水量))\n",
    "print(人均用水量)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 759,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[('北京', 181.88), ('天津', 176.33), ('河北', 242.3), ('山西', 202.87), ('内蒙古', 744.68), ('辽宁', 299.77), ('吉林', 464.95), ('黑龙江', 930.69), ('上海', 433.26), ('江苏', 737.84), ('浙江', 319.2), ('安徽', 466.33), ('福建', 493.26), ('江西', 538.3), ('山东', 210.0), ('河南', 244.93), ('湖北', 492.58), ('湖南', 477.85), ('广东', 391.1), ('广西', 586.03), ('海南', 494.81), ('重庆', 252.8), ('四川', 324.08), ('贵州', 290.12), ('云南', 327.22), ('西藏', 940.77), ('陕西', 243.21), ('甘肃', 443.47), ('青海', 433.08), ('宁夏', 974.28), ('新疆', 2280.78), ('台湾', 0.0)]\n"
     ]
    }
   ],
   "source": [
    "人均用水量 = list(zip(list(df.地区),list(df.人均用水量.fillna(0))))\n",
    "print(人均用水量)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 720,
   "metadata": {},
   "outputs": [],
   "source": [
    "分省供水总量 = zip(list(df.地区),list(df.供水总量))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 721,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "<zip object at 0x0000020A857F7548>\n"
     ]
    }
   ],
   "source": [
    "print(分省供水总量)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 722,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[('北京', 39.5), ('天津', 27.5), ('河北', 181.6), ('山西', 74.9), ('内蒙古', 188.0), ('辽宁', 131.1), ('吉林', 126.7), ('黑龙江', 353.1), ('上海', 104.8), ('江苏', 591.3), ('浙江', 179.5), ('安徽', 290.3), ('福建', 192.0), ('江西', 248.0), ('山东', 209.5), ('河南', 233.8), ('湖北', 290.3), ('湖南', 326.9), ('广东', 433.5), ('广西', 284.9), ('海南', 45.6), ('重庆', 77.4), ('四川', 268.4), ('贵州', 103.5), ('云南', 156.6), ('西藏', 31.4), ('陕西', 93.0), ('甘肃', 116.1), ('青海', 25.8), ('宁夏', 66.1), ('新疆', 552.3), ('台湾', 0.0)]\n"
     ]
    }
   ],
   "source": [
    "分省供水总量 = list(zip(list(df.地区),list(df.供水总量.fillna(0))))\n",
    "print(分省供水总量)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 723,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[29.8, 13.0, 138.3, 130.2, 309.9, 186.3, 394.4, 742.5, 34.0, 392.9, 895.3, 784.9, 1055.6, 1655.1, 225.6, 423.1, 1248.8, 1912.4, 1786.6, 2388.0, 383.9, 656.1, 2467.1, 1051.5, 2202.6, 4749.9, 449.1, 238.9, 785.7, 10.8, 1018.6, nan]\n"
     ]
    }
   ],
   "source": [
    "print(list(df.水资源总量))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 724,
   "metadata": {},
   "outputs": [],
   "source": [
    "分省水资源总量 = zip(list(df.地区),list(df.水资源总量))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 725,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "<zip object at 0x0000020A857F7BC8>\n"
     ]
    }
   ],
   "source": [
    "print(分省水资源总量)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 726,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[('北京', 29.8), ('天津', 13.0), ('河北', 138.3), ('山西', 130.2), ('内蒙古', 309.9), ('辽宁', 186.3), ('吉林', 394.4), ('黑龙江', 742.5), ('上海', 34.0), ('江苏', 392.9), ('浙江', 895.3), ('安徽', 784.9), ('福建', 1055.6), ('江西', 1655.1), ('山东', 225.6), ('河南', 423.1), ('湖北', 1248.8), ('湖南', 1912.4), ('广东', 1786.6), ('广西', 2388.0), ('海南', 383.9), ('重庆', 656.1), ('四川', 2467.1), ('贵州', 1051.5), ('云南', 2202.6), ('西藏', 4749.9), ('陕西', 449.1), ('甘肃', 238.9), ('青海', 785.7), ('宁夏', 10.8), ('新疆', 1018.6), ('台湾', 0.0)]\n"
     ]
    }
   ],
   "source": [
    "分省水资源总量 = list(zip(list(df.地区),list(df.水资源总量.fillna(0))))\n",
    "print(分省水资源总量)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 747,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[18.83,\n",
       " 9.28,\n",
       " 16.13,\n",
       " 9.41,\n",
       " 8.26,\n",
       " 25.01,\n",
       " 10.46,\n",
       " 14.2,\n",
       " 31.01,\n",
       " 54.0,\n",
       " 35.74,\n",
       " 18.99,\n",
       " 17.3,\n",
       " 12.48,\n",
       " 38.55,\n",
       " 20.86,\n",
       " 29.49,\n",
       " 19.48,\n",
       " 89.68,\n",
       " 18.36,\n",
       " 4.82,\n",
       " 13.8,\n",
       " 25.59,\n",
       " 7.14,\n",
       " 8.96,\n",
       " 1.11,\n",
       " 13.79,\n",
       " 5.1,\n",
       " 2.73,\n",
       " 3.35,\n",
       " 9.86,\n",
       " 0.0]"
      ]
     },
     "execution_count": 747,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "人均日生活用水量= list(df.人均日生活用水量.fillna(0))\n",
    "人均日生活用水量"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 748,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[39.5,\n",
       " 27.5,\n",
       " 181.6,\n",
       " 74.9,\n",
       " 188.0,\n",
       " 131.1,\n",
       " 126.7,\n",
       " 353.1,\n",
       " 104.8,\n",
       " 591.3,\n",
       " 179.5,\n",
       " 290.3,\n",
       " 192.0,\n",
       " 248.0,\n",
       " 209.5,\n",
       " 233.8,\n",
       " 290.3,\n",
       " 326.9,\n",
       " 433.5,\n",
       " 284.9,\n",
       " 45.6,\n",
       " 77.4,\n",
       " 268.4,\n",
       " 103.5,\n",
       " 156.6,\n",
       " 31.4,\n",
       " 93.0,\n",
       " 116.1,\n",
       " 25.8,\n",
       " 66.1,\n",
       " 552.3,\n",
       " 0.0]"
      ]
     },
     "execution_count": 748,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "用水总量= list(df.用水总量.fillna(0))\n",
    "用水总量"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 749,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[52912.0,\n",
       " 38975.0,\n",
       " 15893.0,\n",
       " 18132.0,\n",
       " 23909.0,\n",
       " 24866.0,\n",
       " 15083.0,\n",
       " 18859.0,\n",
       " 53617.0,\n",
       " 39796.0,\n",
       " 33851.0,\n",
       " 17141.0,\n",
       " 25969.0,\n",
       " 17290.0,\n",
       " 28353.0,\n",
       " 17842.0,\n",
       " 21642.0,\n",
       " 19418.0,\n",
       " 30762.0,\n",
       " 16064.0,\n",
       " 20939.0,\n",
       " 22927.0,\n",
       " 17920.0,\n",
       " 16349.0,\n",
       " 15831.0,\n",
       " 10990.0,\n",
       " 18485.0,\n",
       " 14203.0,\n",
       " 18020.0,\n",
       " 21058.0,\n",
       " 16736.0,\n",
       " 0.0]"
      ]
     },
     "execution_count": 749,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "居民消费水平= list(df.居民消费水平.fillna(0))\n",
    "居民消费水平"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 750,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[39.5,\n",
       " 27.5,\n",
       " 181.6,\n",
       " 74.9,\n",
       " 188.0,\n",
       " 131.1,\n",
       " 126.7,\n",
       " 353.1,\n",
       " 104.8,\n",
       " 591.3,\n",
       " 179.5,\n",
       " 290.3,\n",
       " 192.0,\n",
       " 248.0,\n",
       " 209.5,\n",
       " 233.8,\n",
       " 290.3,\n",
       " 326.9,\n",
       " 433.5,\n",
       " 284.9,\n",
       " 45.6,\n",
       " 77.4,\n",
       " 268.4,\n",
       " 103.5,\n",
       " 156.6,\n",
       " 31.4,\n",
       " 93.0,\n",
       " 116.1,\n",
       " 25.8,\n",
       " 66.1,\n",
       " 552.3,\n",
       " 0.0]"
      ]
     },
     "execution_count": 750,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "供水总量= list(df.供水总量.fillna(0))\n",
    "供水总量"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 746,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[181.88,\n",
       " 176.33,\n",
       " 242.3,\n",
       " 202.87,\n",
       " 744.68,\n",
       " 299.77,\n",
       " 464.95,\n",
       " 930.69,\n",
       " 433.26,\n",
       " 737.84,\n",
       " 319.2,\n",
       " 466.33,\n",
       " 493.26,\n",
       " 538.3,\n",
       " 210.0,\n",
       " 244.93,\n",
       " 492.58,\n",
       " 477.85,\n",
       " 391.1,\n",
       " 586.03,\n",
       " 494.81,\n",
       " 252.8,\n",
       " 324.08,\n",
       " 290.12,\n",
       " 327.22,\n",
       " 940.77,\n",
       " 243.21,\n",
       " 443.47,\n",
       " 433.08,\n",
       " 974.28,\n",
       " 2280.78,\n",
       " 0.0]"
      ]
     },
     "execution_count": 746,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "人均用水量= list(df.人均用水量.fillna(0))\n",
    "人均用水量"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 751,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[28014.94,\n",
       " 18549.19,\n",
       " 34016.32,\n",
       " 15528.42,\n",
       " 16096.21,\n",
       " 23409.24,\n",
       " 14944.53,\n",
       " 15902.68,\n",
       " 30632.99,\n",
       " 85869.76,\n",
       " 51768.26,\n",
       " 27018.0,\n",
       " 32182.09,\n",
       " 20006.31,\n",
       " 72634.15,\n",
       " 44552.83,\n",
       " 35478.09,\n",
       " 33902.96,\n",
       " 89705.23,\n",
       " 18523.26,\n",
       " 4462.54,\n",
       " 19424.73,\n",
       " 36980.22,\n",
       " 13540.83,\n",
       " 16376.34,\n",
       " 1310.92,\n",
       " 21898.81,\n",
       " 7459.9,\n",
       " 2624.83,\n",
       " 3443.56,\n",
       " 10881.96,\n",
       " 0.0]"
      ]
     },
     "execution_count": 751,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "GDP= list(df.GDP.fillna(0))\n",
    "GDP"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 752,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "10.8"
      ]
     },
     "execution_count": 752,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.水资源总量.min()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 753,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "4749.9"
      ]
     },
     "execution_count": 753,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.水资源总量.max()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 754,
   "metadata": {},
   "outputs": [],
   "source": [
    "from pyecharts.faker import Faker\n",
    "from pyecharts import options as opts\n",
    "from pyecharts.charts import Map\n",
    "from pyecharts.globals import ChartType, SymbolType\n",
    "\n",
    "\n",
    "def map_分省水资源总量() -> Map:\n",
    "    c = (\n",
    "        Map()\n",
    "        .add(\"分省水资源总量(亿/立方米)\", 分省水资源总量, \"china\")\n",
    "            .set_series_opts(label_opts=opts.LabelOpts(is_show=False))\n",
    "        .set_global_opts(\n",
    "          visualmap_opts=opts.VisualMapOpts(min_=df.水资源总量.min(),max_=df.水资源总量.max()),\n",
    "            title_opts=opts.TitleOpts(title=\"中国分省水资源总量数据\"),\n",
    "        )\n",
    "    )\n",
    "    return c\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 755,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "\n",
       "<script>\n",
       "    require.config({\n",
       "        paths: {\n",
       "            'echarts':'https://assets.pyecharts.org/assets/echarts.min', 'china':'https://assets.pyecharts.org/assets/maps/china'\n",
       "        }\n",
       "    });\n",
       "</script>\n",
       "\n",
       "        <div id=\"842c33185527445eb9cd556553a272cd\" style=\"width:900px; height:500px;\"></div>\n",
       "\n",
       "<script>\n",
       "        require(['echarts', 'china'], function(echarts) {\n",
       "                var chart_842c33185527445eb9cd556553a272cd = echarts.init(\n",
       "                    document.getElementById('842c33185527445eb9cd556553a272cd'), 'white', {renderer: 'canvas'});\n",
       "                var option_842c33185527445eb9cd556553a272cd = {\n",
       "    \"animation\": true,\n",
       "    \"animationThreshold\": 2000,\n",
       "    \"animationDuration\": 1000,\n",
       "    \"animationEasing\": \"cubicOut\",\n",
       "    \"animationDelay\": 0,\n",
       "    \"animationDurationUpdate\": 300,\n",
       "    \"animationEasingUpdate\": \"cubicOut\",\n",
       "    \"animationDelayUpdate\": 0,\n",
       "    \"color\": [\n",
       "        \"#c23531\",\n",
       "        \"#2f4554\",\n",
       "        \"#61a0a8\",\n",
       "        \"#d48265\",\n",
       "        \"#749f83\",\n",
       "        \"#ca8622\",\n",
       "        \"#bda29a\",\n",
       "        \"#6e7074\",\n",
       "        \"#546570\",\n",
       "        \"#c4ccd3\",\n",
       "        \"#f05b72\",\n",
       "        \"#ef5b9c\",\n",
       "        \"#f47920\",\n",
       "        \"#905a3d\",\n",
       "        \"#fab27b\",\n",
       "        \"#2a5caa\",\n",
       "        \"#444693\",\n",
       "        \"#726930\",\n",
       "        \"#b2d235\",\n",
       "        \"#6d8346\",\n",
       "        \"#ac6767\",\n",
       "        \"#1d953f\",\n",
       "        \"#6950a1\",\n",
       "        \"#918597\"\n",
       "    ],\n",
       "    \"series\": [\n",
       "        {\n",
       "            \"type\": \"map\",\n",
       "            \"name\": \"\\u5206\\u7701\\u6c34\\u8d44\\u6e90\\u603b\\u91cf(\\u4ebf/\\u7acb\\u65b9\\u7c73)\",\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            },\n",
       "            \"mapType\": \"china\",\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u5317\\u4eac\",\n",
       "                    \"value\": 29.8\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5929\\u6d25\",\n",
       "                    \"value\": 13.0\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u6cb3\\u5317\",\n",
       "                    \"value\": 138.3\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5c71\\u897f\",\n",
       "                    \"value\": 130.2\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5185\\u8499\\u53e4\",\n",
       "                    \"value\": 309.9\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u8fbd\\u5b81\",\n",
       "                    \"value\": 186.3\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5409\\u6797\",\n",
       "                    \"value\": 394.4\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u9ed1\\u9f99\\u6c5f\",\n",
       "                    \"value\": 742.5\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u4e0a\\u6d77\",\n",
       "                    \"value\": 34.0\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u6c5f\\u82cf\",\n",
       "                    \"value\": 392.9\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u6d59\\u6c5f\",\n",
       "                    \"value\": 895.3\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5b89\\u5fbd\",\n",
       "                    \"value\": 784.9\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u798f\\u5efa\",\n",
       "                    \"value\": 1055.6\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u6c5f\\u897f\",\n",
       "                    \"value\": 1655.1\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5c71\\u4e1c\",\n",
       "                    \"value\": 225.6\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u6cb3\\u5357\",\n",
       "                    \"value\": 423.1\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u6e56\\u5317\",\n",
       "                    \"value\": 1248.8\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u6e56\\u5357\",\n",
       "                    \"value\": 1912.4\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5e7f\\u4e1c\",\n",
       "                    \"value\": 1786.6\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5e7f\\u897f\",\n",
       "                    \"value\": 2388.0\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u6d77\\u5357\",\n",
       "                    \"value\": 383.9\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u91cd\\u5e86\",\n",
       "                    \"value\": 656.1\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u56db\\u5ddd\",\n",
       "                    \"value\": 2467.1\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u8d35\\u5dde\",\n",
       "                    \"value\": 1051.5\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u4e91\\u5357\",\n",
       "                    \"value\": 2202.6\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u897f\\u85cf\",\n",
       "                    \"value\": 4749.9\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u9655\\u897f\",\n",
       "                    \"value\": 449.1\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u7518\\u8083\",\n",
       "                    \"value\": 238.9\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u9752\\u6d77\",\n",
       "                    \"value\": 785.7\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5b81\\u590f\",\n",
       "                    \"value\": 10.8\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u65b0\\u7586\",\n",
       "                    \"value\": 1018.6\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u53f0\\u6e7e\",\n",
       "                    \"value\": 0.0\n",
       "                }\n",
       "            ],\n",
       "            \"roam\": true,\n",
       "            \"zoom\": 1,\n",
       "            \"showLegendSymbol\": true,\n",
       "            \"emphasis\": {},\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            }\n",
       "        }\n",
       "    ],\n",
       "    \"legend\": [\n",
       "        {\n",
       "            \"data\": [\n",
       "                \"\\u5206\\u7701\\u6c34\\u8d44\\u6e90\\u603b\\u91cf(\\u4ebf/\\u7acb\\u65b9\\u7c73)\"\n",
       "            ],\n",
       "            \"selected\": {\n",
       "                \"\\u5206\\u7701\\u6c34\\u8d44\\u6e90\\u603b\\u91cf(\\u4ebf/\\u7acb\\u65b9\\u7c73)\": true\n",
       "            },\n",
       "            \"show\": true\n",
       "        }\n",
       "    ],\n",
       "    \"tooltip\": {\n",
       "        \"show\": true,\n",
       "        \"trigger\": \"item\",\n",
       "        \"triggerOn\": \"mousemove|click\",\n",
       "        \"axisPointer\": {\n",
       "            \"type\": \"line\"\n",
       "        },\n",
       "        \"textStyle\": {\n",
       "            \"fontSize\": 14\n",
       "        },\n",
       "        \"borderWidth\": 0\n",
       "    },\n",
       "    \"title\": [\n",
       "        {\n",
       "            \"text\": \"\\u4e2d\\u56fd\\u5206\\u7701\\u6c34\\u8d44\\u6e90\\u603b\\u91cf\\u6570\\u636e\"\n",
       "        }\n",
       "    ],\n",
       "    \"visualMap\": {\n",
       "        \"show\": true,\n",
       "        \"type\": \"continuous\",\n",
       "        \"min\": 10.8,\n",
       "        \"max\": 4749.9,\n",
       "        \"inRange\": {\n",
       "            \"color\": [\n",
       "                \"#50a3ba\",\n",
       "                \"#eac763\",\n",
       "                \"#d94e5d\"\n",
       "            ]\n",
       "        },\n",
       "        \"calculable\": true,\n",
       "        \"splitNumber\": 5,\n",
       "        \"orient\": \"vertical\",\n",
       "        \"showLabel\": true\n",
       "    }\n",
       "};\n",
       "                chart_842c33185527445eb9cd556553a272cd.setOption(option_842c33185527445eb9cd556553a272cd);\n",
       "        });\n",
       "    </script>\n"
      ],
      "text/plain": [
       "<pyecharts.render.display.HTML at 0x20a858227f0>"
      ]
     },
     "execution_count": 755,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "分省水资源总量地理图 =map_分省水资源总量() \n",
    "分省水资源总量地理图.render_notebook()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "* 根据分省水资源总量地理图可看出，中国北方各省水资源比南方短缺，尤其是华北人口集聚和西北干旱一带"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 756,
   "metadata": {},
   "outputs": [],
   "source": [
    "from pyecharts.faker import Faker\n",
    "from pyecharts import options as opts\n",
    "from pyecharts.charts import Bar, Grid, Line,Scatter\n",
    "def grid_mutil_yaxis_f() -> Grid:\n",
    "    x_data = ['北京', '天津', '河北', '山西', '内蒙古', '辽宁', '吉林', '黑龙江', '上海', '江苏', '浙江', '安徽', '福建', '江西', '山东', '河南', '湖北', '湖南', '广东', '广西', '海南', '重庆', '四川', '贵州', '云南', '西藏', '陕西', '甘肃', '青海', '宁夏', '新疆','台湾']\n",
    "    bar = (\n",
    "        Bar()\n",
    "        .add_xaxis(x_data)\n",
    "        .add_yaxis(\n",
    "            \"供/用水总量(亿/立方米)\",供水总量,\n",
    "            color=\"#5793f3\",\n",
    "        )\n",
    "         .extend_axis(\n",
    "            yaxis=opts.AxisOpts(\n",
    "                name=\"供/用水总量(亿/立方米)\",\n",
    "                type_=\"value\",\n",
    "                min_=0,\n",
    "                max_=1000,\n",
    "                position=\"right\",\n",
    "                axisline_opts=opts.AxisLineOpts(\n",
    "                    linestyle_opts=opts.LineStyleOpts(color=\"#675bba\")\n",
    "                ),\n",
    "                axislabel_opts=opts.LabelOpts(formatter=\"{value} 亿/立方米\"),\n",
    "            )\n",
    "        )\n",
    "      \n",
    "        .extend_axis(\n",
    "            yaxis=opts.AxisOpts(\n",
    "                type_=\"value\",\n",
    "                name=\"水资源总量(亿/立方米)\",\n",
    "                min_=0,\n",
    "                max_=5000,\n",
    "                position=\"left\",\n",
    "                axisline_opts=opts.AxisLineOpts(\n",
    "                    linestyle_opts=opts.LineStyleOpts(color=\"#d14a61\")\n",
    "                ),\n",
    "                axislabel_opts=opts.LabelOpts(formatter=\"{value}亿/立方米\"),\n",
    "                splitline_opts=opts.SplitLineOpts(\n",
    "                    is_show=True, linestyle_opts=opts.LineStyleOpts(opacity=1)\n",
    "                ),\n",
    "            )\n",
    "        )\n",
    "   .set_global_opts(\n",
    "            yaxis_opts=opts.AxisOpts(\n",
    "                name=\"供/用水总量(亿/立方米)\",\n",
    "                min_=0,\n",
    "                max_=1000,\n",
    "                position=\"right\",\n",
    "              \n",
    "                axisline_opts=opts.AxisLineOpts(\n",
    "                    linestyle_opts=opts.LineStyleOpts(color=\"#5793f3\")\n",
    "                ),\n",
    "                axislabel_opts=opts.LabelOpts(formatter=\"{value} 亿/立方米\"),\n",
    "            ),\n",
    "            title_opts=opts.TitleOpts(title=\"供水与水资源\"),\n",
    "            tooltip_opts=opts.TooltipOpts(trigger=\"axis\", axis_pointer_type=\"cross\"),\n",
    "        )\n",
    "    )\n",
    "    line = (\n",
    "        Line()\n",
    "        .add_xaxis(x_data)\n",
    "        .add_yaxis(\n",
    "            \"水资源总量(亿/立方米)\",\n",
    "             水资源总量,\n",
    "             yaxis_index=2,\n",
    "            color=\"#675bba\",\n",
    "            label_opts=opts.LabelOpts(is_show=False),\n",
    "        )\n",
    "    )\n",
    "\n",
    "    bar.overlap(line)\n",
    "    return Grid().add(bar, opts.GridOpts(pos_left=\"15%\", pos_right=\"20%\"), is_control_axis_index=True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 757,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "\n",
       "<script>\n",
       "    require.config({\n",
       "        paths: {\n",
       "            'echarts':'https://assets.pyecharts.org/assets/echarts.min'\n",
       "        }\n",
       "    });\n",
       "</script>\n",
       "\n",
       "        <div id=\"7379b152c023428995a67e6cd2ae3ad7\" style=\"width:900px; height:500px;\"></div>\n",
       "\n",
       "<script>\n",
       "        require(['echarts'], function(echarts) {\n",
       "                var chart_7379b152c023428995a67e6cd2ae3ad7 = echarts.init(\n",
       "                    document.getElementById('7379b152c023428995a67e6cd2ae3ad7'), 'white', {renderer: 'canvas'});\n",
       "                var option_7379b152c023428995a67e6cd2ae3ad7 = {\n",
       "    \"animation\": true,\n",
       "    \"animationThreshold\": 2000,\n",
       "    \"animationDuration\": 1000,\n",
       "    \"animationEasing\": \"cubicOut\",\n",
       "    \"animationDelay\": 0,\n",
       "    \"animationDurationUpdate\": 300,\n",
       "    \"animationEasingUpdate\": \"cubicOut\",\n",
       "    \"animationDelayUpdate\": 0,\n",
       "    \"color\": [\n",
       "        \"#5793f3\",\n",
       "        \"#c23531\",\n",
       "        \"#2f4554\",\n",
       "        \"#61a0a8\",\n",
       "        \"#d48265\",\n",
       "        \"#749f83\",\n",
       "        \"#ca8622\",\n",
       "        \"#bda29a\",\n",
       "        \"#6e7074\",\n",
       "        \"#546570\",\n",
       "        \"#c4ccd3\",\n",
       "        \"#f05b72\",\n",
       "        \"#ef5b9c\",\n",
       "        \"#f47920\",\n",
       "        \"#905a3d\",\n",
       "        \"#fab27b\",\n",
       "        \"#2a5caa\",\n",
       "        \"#444693\",\n",
       "        \"#726930\",\n",
       "        \"#b2d235\",\n",
       "        \"#6d8346\",\n",
       "        \"#ac6767\",\n",
       "        \"#1d953f\",\n",
       "        \"#6950a1\",\n",
       "        \"#918597\"\n",
       "    ],\n",
       "    \"series\": [\n",
       "        {\n",
       "            \"type\": \"bar\",\n",
       "            \"name\": \"\\u4f9b/\\u7528\\u6c34\\u603b\\u91cf(\\u4ebf/\\u7acb\\u65b9\\u7c73)\",\n",
       "            \"data\": [\n",
       "                39.5,\n",
       "                27.5,\n",
       "                181.6,\n",
       "                74.9,\n",
       "                188.0,\n",
       "                131.1,\n",
       "                126.7,\n",
       "                353.1,\n",
       "                104.8,\n",
       "                591.3,\n",
       "                179.5,\n",
       "                290.3,\n",
       "                192.0,\n",
       "                248.0,\n",
       "                209.5,\n",
       "                233.8,\n",
       "                290.3,\n",
       "                326.9,\n",
       "                433.5,\n",
       "                284.9,\n",
       "                45.6,\n",
       "                77.4,\n",
       "                268.4,\n",
       "                103.5,\n",
       "                156.6,\n",
       "                31.4,\n",
       "                93.0,\n",
       "                116.1,\n",
       "                25.8,\n",
       "                66.1,\n",
       "                552.3,\n",
       "                0.0\n",
       "            ],\n",
       "            \"barCategoryGap\": \"20%\",\n",
       "            \"label\": {\n",
       "                \"show\": true,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"line\",\n",
       "            \"name\": \"\\u6c34\\u8d44\\u6e90\\u603b\\u91cf(\\u4ebf/\\u7acb\\u65b9\\u7c73)\",\n",
       "            \"connectNulls\": false,\n",
       "            \"yAxisIndex\": 2,\n",
       "            \"symbolSize\": 4,\n",
       "            \"showSymbol\": true,\n",
       "            \"smooth\": false,\n",
       "            \"step\": false,\n",
       "            \"data\": [\n",
       "                [\n",
       "                    \"\\u5317\\u4eac\",\n",
       "                    29.8\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u5929\\u6d25\",\n",
       "                    13.0\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u6cb3\\u5317\",\n",
       "                    138.3\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u5c71\\u897f\",\n",
       "                    130.2\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u5185\\u8499\\u53e4\",\n",
       "                    309.9\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u8fbd\\u5b81\",\n",
       "                    186.3\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u5409\\u6797\",\n",
       "                    394.4\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u9ed1\\u9f99\\u6c5f\",\n",
       "                    742.5\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u4e0a\\u6d77\",\n",
       "                    34.0\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u6c5f\\u82cf\",\n",
       "                    392.9\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u6d59\\u6c5f\",\n",
       "                    895.3\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u5b89\\u5fbd\",\n",
       "                    784.9\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u798f\\u5efa\",\n",
       "                    1055.6\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u6c5f\\u897f\",\n",
       "                    1655.1\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u5c71\\u4e1c\",\n",
       "                    225.6\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u6cb3\\u5357\",\n",
       "                    423.1\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u6e56\\u5317\",\n",
       "                    1248.8\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u6e56\\u5357\",\n",
       "                    1912.4\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u5e7f\\u4e1c\",\n",
       "                    1786.6\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u5e7f\\u897f\",\n",
       "                    2388.0\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u6d77\\u5357\",\n",
       "                    383.9\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u91cd\\u5e86\",\n",
       "                    656.1\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u56db\\u5ddd\",\n",
       "                    2467.1\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u8d35\\u5dde\",\n",
       "                    1051.5\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u4e91\\u5357\",\n",
       "                    2202.6\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u897f\\u85cf\",\n",
       "                    4749.9\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u9655\\u897f\",\n",
       "                    449.1\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u7518\\u8083\",\n",
       "                    238.9\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u9752\\u6d77\",\n",
       "                    785.7\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u5b81\\u590f\",\n",
       "                    10.8\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u65b0\\u7586\",\n",
       "                    1018.6\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u53f0\\u6e7e\",\n",
       "                    0.0\n",
       "                ]\n",
       "            ],\n",
       "            \"hoverAnimation\": true,\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            },\n",
       "            \"lineStyle\": {\n",
       "                \"width\": 1,\n",
       "                \"opacity\": 1,\n",
       "                \"curveness\": 0,\n",
       "                \"type\": \"solid\"\n",
       "            },\n",
       "            \"areaStyle\": {\n",
       "                \"opacity\": 0\n",
       "            }\n",
       "        }\n",
       "    ],\n",
       "    \"legend\": [\n",
       "        {\n",
       "            \"data\": [\n",
       "                \"\\u4f9b/\\u7528\\u6c34\\u603b\\u91cf(\\u4ebf/\\u7acb\\u65b9\\u7c73)\",\n",
       "                \"\\u6c34\\u8d44\\u6e90\\u603b\\u91cf(\\u4ebf/\\u7acb\\u65b9\\u7c73)\"\n",
       "            ],\n",
       "            \"selected\": {\n",
       "                \"\\u4f9b/\\u7528\\u6c34\\u603b\\u91cf(\\u4ebf/\\u7acb\\u65b9\\u7c73)\": true\n",
       "            },\n",
       "            \"show\": true\n",
       "        }\n",
       "    ],\n",
       "    \"tooltip\": {\n",
       "        \"show\": true,\n",
       "        \"trigger\": \"axis\",\n",
       "        \"triggerOn\": \"mousemove|click\",\n",
       "        \"axisPointer\": {\n",
       "            \"type\": \"cross\"\n",
       "        },\n",
       "        \"textStyle\": {\n",
       "            \"fontSize\": 14\n",
       "        },\n",
       "        \"borderWidth\": 0\n",
       "    },\n",
       "    \"xAxis\": [\n",
       "        {\n",
       "            \"show\": true,\n",
       "            \"scale\": false,\n",
       "            \"nameLocation\": \"end\",\n",
       "            \"nameGap\": 15,\n",
       "            \"gridIndex\": 0,\n",
       "            \"inverse\": false,\n",
       "            \"offset\": 0,\n",
       "            \"splitNumber\": 5,\n",
       "            \"minInterval\": 0,\n",
       "            \"splitLine\": {\n",
       "                \"show\": false,\n",
       "                \"lineStyle\": {\n",
       "                    \"width\": 1,\n",
       "                    \"opacity\": 1,\n",
       "                    \"curveness\": 0,\n",
       "                    \"type\": \"solid\"\n",
       "                }\n",
       "            },\n",
       "            \"data\": [\n",
       "                \"\\u5317\\u4eac\",\n",
       "                \"\\u5929\\u6d25\",\n",
       "                \"\\u6cb3\\u5317\",\n",
       "                \"\\u5c71\\u897f\",\n",
       "                \"\\u5185\\u8499\\u53e4\",\n",
       "                \"\\u8fbd\\u5b81\",\n",
       "                \"\\u5409\\u6797\",\n",
       "                \"\\u9ed1\\u9f99\\u6c5f\",\n",
       "                \"\\u4e0a\\u6d77\",\n",
       "                \"\\u6c5f\\u82cf\",\n",
       "                \"\\u6d59\\u6c5f\",\n",
       "                \"\\u5b89\\u5fbd\",\n",
       "                \"\\u798f\\u5efa\",\n",
       "                \"\\u6c5f\\u897f\",\n",
       "                \"\\u5c71\\u4e1c\",\n",
       "                \"\\u6cb3\\u5357\",\n",
       "                \"\\u6e56\\u5317\",\n",
       "                \"\\u6e56\\u5357\",\n",
       "                \"\\u5e7f\\u4e1c\",\n",
       "                \"\\u5e7f\\u897f\",\n",
       "                \"\\u6d77\\u5357\",\n",
       "                \"\\u91cd\\u5e86\",\n",
       "                \"\\u56db\\u5ddd\",\n",
       "                \"\\u8d35\\u5dde\",\n",
       "                \"\\u4e91\\u5357\",\n",
       "                \"\\u897f\\u85cf\",\n",
       "                \"\\u9655\\u897f\",\n",
       "                \"\\u7518\\u8083\",\n",
       "                \"\\u9752\\u6d77\",\n",
       "                \"\\u5b81\\u590f\",\n",
       "                \"\\u65b0\\u7586\",\n",
       "                \"\\u53f0\\u6e7e\"\n",
       "            ]\n",
       "        }\n",
       "    ],\n",
       "    \"yAxis\": [\n",
       "        {\n",
       "            \"name\": \"\\u4f9b/\\u7528\\u6c34\\u603b\\u91cf(\\u4ebf/\\u7acb\\u65b9\\u7c73)\",\n",
       "            \"show\": true,\n",
       "            \"scale\": false,\n",
       "            \"nameLocation\": \"end\",\n",
       "            \"nameGap\": 15,\n",
       "            \"gridIndex\": 0,\n",
       "            \"axisLine\": {\n",
       "                \"show\": true,\n",
       "                \"onZero\": true,\n",
       "                \"onZeroAxisIndex\": 0,\n",
       "                \"lineStyle\": {\n",
       "                    \"width\": 1,\n",
       "                    \"opacity\": 1,\n",
       "                    \"curveness\": 0,\n",
       "                    \"type\": \"solid\",\n",
       "                    \"color\": \"#5793f3\"\n",
       "                }\n",
       "            },\n",
       "            \"axisLabel\": {\n",
       "                \"show\": true,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8,\n",
       "                \"formatter\": \"{value} \\u4ebf/\\u7acb\\u65b9\\u7c73\"\n",
       "            },\n",
       "            \"inverse\": false,\n",
       "            \"position\": \"right\",\n",
       "            \"offset\": 0,\n",
       "            \"splitNumber\": 5,\n",
       "            \"min\": 0,\n",
       "            \"max\": 1000,\n",
       "            \"minInterval\": 0,\n",
       "            \"splitLine\": {\n",
       "                \"show\": false,\n",
       "                \"lineStyle\": {\n",
       "                    \"width\": 1,\n",
       "                    \"opacity\": 1,\n",
       "                    \"curveness\": 0,\n",
       "                    \"type\": \"solid\"\n",
       "                }\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"value\",\n",
       "            \"name\": \"\\u4f9b/\\u7528\\u6c34\\u603b\\u91cf(\\u4ebf/\\u7acb\\u65b9\\u7c73)\",\n",
       "            \"show\": true,\n",
       "            \"scale\": false,\n",
       "            \"nameLocation\": \"end\",\n",
       "            \"nameGap\": 15,\n",
       "            \"gridIndex\": 0,\n",
       "            \"axisLine\": {\n",
       "                \"show\": true,\n",
       "                \"onZero\": true,\n",
       "                \"onZeroAxisIndex\": 0,\n",
       "                \"lineStyle\": {\n",
       "                    \"width\": 1,\n",
       "                    \"opacity\": 1,\n",
       "                    \"curveness\": 0,\n",
       "                    \"type\": \"solid\",\n",
       "                    \"color\": \"#675bba\"\n",
       "                }\n",
       "            },\n",
       "            \"axisLabel\": {\n",
       "                \"show\": true,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8,\n",
       "                \"formatter\": \"{value} \\u4ebf/\\u7acb\\u65b9\\u7c73\"\n",
       "            },\n",
       "            \"inverse\": false,\n",
       "            \"position\": \"right\",\n",
       "            \"offset\": 0,\n",
       "            \"splitNumber\": 5,\n",
       "            \"min\": 0,\n",
       "            \"max\": 1000,\n",
       "            \"minInterval\": 0,\n",
       "            \"splitLine\": {\n",
       "                \"show\": false,\n",
       "                \"lineStyle\": {\n",
       "                    \"width\": 1,\n",
       "                    \"opacity\": 1,\n",
       "                    \"curveness\": 0,\n",
       "                    \"type\": \"solid\"\n",
       "                }\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"value\",\n",
       "            \"name\": \"\\u6c34\\u8d44\\u6e90\\u603b\\u91cf(\\u4ebf/\\u7acb\\u65b9\\u7c73)\",\n",
       "            \"show\": true,\n",
       "            \"scale\": false,\n",
       "            \"nameLocation\": \"end\",\n",
       "            \"nameGap\": 15,\n",
       "            \"gridIndex\": 0,\n",
       "            \"axisLine\": {\n",
       "                \"show\": true,\n",
       "                \"onZero\": true,\n",
       "                \"onZeroAxisIndex\": 0,\n",
       "                \"lineStyle\": {\n",
       "                    \"width\": 1,\n",
       "                    \"opacity\": 1,\n",
       "                    \"curveness\": 0,\n",
       "                    \"type\": \"solid\",\n",
       "                    \"color\": \"#d14a61\"\n",
       "                }\n",
       "            },\n",
       "            \"axisLabel\": {\n",
       "                \"show\": true,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8,\n",
       "                \"formatter\": \"{value}\\u4ebf/\\u7acb\\u65b9\\u7c73\"\n",
       "            },\n",
       "            \"inverse\": false,\n",
       "            \"position\": \"left\",\n",
       "            \"offset\": 0,\n",
       "            \"splitNumber\": 5,\n",
       "            \"min\": 0,\n",
       "            \"max\": 5000,\n",
       "            \"minInterval\": 0,\n",
       "            \"splitLine\": {\n",
       "                \"show\": true,\n",
       "                \"lineStyle\": {\n",
       "                    \"width\": 1,\n",
       "                    \"opacity\": 1,\n",
       "                    \"curveness\": 0,\n",
       "                    \"type\": \"solid\"\n",
       "                }\n",
       "            }\n",
       "        }\n",
       "    ],\n",
       "    \"title\": [\n",
       "        {\n",
       "            \"text\": \"\\u4f9b\\u6c34\\u4e0e\\u6c34\\u8d44\\u6e90\"\n",
       "        }\n",
       "    ],\n",
       "    \"grid\": [\n",
       "        {\n",
       "            \"left\": \"15%\",\n",
       "            \"right\": \"20%\"\n",
       "        }\n",
       "    ]\n",
       "};\n",
       "                chart_7379b152c023428995a67e6cd2ae3ad7.setOption(option_7379b152c023428995a67e6cd2ae3ad7);\n",
       "        });\n",
       "    </script>\n"
      ],
      "text/plain": [
       "<pyecharts.render.display.HTML at 0x20a856e4c18>"
      ]
     },
     "execution_count": 757,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "f =  grid_mutil_yaxis_f()\n",
    "f.render_notebook()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 760,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "\n",
       "<script>\n",
       "    require.config({\n",
       "        paths: {\n",
       "            'echarts':'https://assets.pyecharts.org/assets/echarts.min', 'china':'https://assets.pyecharts.org/assets/maps/china'\n",
       "        }\n",
       "    });\n",
       "</script>\n",
       "\n",
       "        <div id=\"593879929e1949a5b23480b612b8fd2e\" style=\"width:900px; height:500px;\"></div>\n",
       "\n",
       "<script>\n",
       "        require(['echarts', 'china'], function(echarts) {\n",
       "                var chart_593879929e1949a5b23480b612b8fd2e = echarts.init(\n",
       "                    document.getElementById('593879929e1949a5b23480b612b8fd2e'), 'white', {renderer: 'canvas'});\n",
       "                var option_593879929e1949a5b23480b612b8fd2e = {\n",
       "    \"animation\": true,\n",
       "    \"animationThreshold\": 2000,\n",
       "    \"animationDuration\": 1000,\n",
       "    \"animationEasing\": \"cubicOut\",\n",
       "    \"animationDelay\": 0,\n",
       "    \"animationDurationUpdate\": 300,\n",
       "    \"animationEasingUpdate\": \"cubicOut\",\n",
       "    \"animationDelayUpdate\": 0,\n",
       "    \"color\": [\n",
       "        \"#c23531\",\n",
       "        \"#2f4554\",\n",
       "        \"#61a0a8\",\n",
       "        \"#d48265\",\n",
       "        \"#749f83\",\n",
       "        \"#ca8622\",\n",
       "        \"#bda29a\",\n",
       "        \"#6e7074\",\n",
       "        \"#546570\",\n",
       "        \"#c4ccd3\",\n",
       "        \"#f05b72\",\n",
       "        \"#ef5b9c\",\n",
       "        \"#f47920\",\n",
       "        \"#905a3d\",\n",
       "        \"#fab27b\",\n",
       "        \"#2a5caa\",\n",
       "        \"#444693\",\n",
       "        \"#726930\",\n",
       "        \"#b2d235\",\n",
       "        \"#6d8346\",\n",
       "        \"#ac6767\",\n",
       "        \"#1d953f\",\n",
       "        \"#6950a1\",\n",
       "        \"#918597\"\n",
       "    ],\n",
       "    \"series\": [\n",
       "        {\n",
       "            \"type\": \"scatter\",\n",
       "            \"name\": \"\\u4eba\\u5747\\u7528\\u6c34\\u91cf\",\n",
       "            \"coordinateSystem\": \"geo\",\n",
       "            \"symbolSize\": 12,\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u5317\\u4eac\",\n",
       "                    \"value\": [\n",
       "                        116.407526,\n",
       "                        39.90403,\n",
       "                        181.88\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5929\\u6d25\",\n",
       "                    \"value\": [\n",
       "                        117.200983,\n",
       "                        39.084158,\n",
       "                        176.33\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u6cb3\\u5317\",\n",
       "                    \"value\": [\n",
       "                        114.468664,\n",
       "                        38.037057,\n",
       "                        242.3\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5c71\\u897f\",\n",
       "                    \"value\": [\n",
       "                        112.562398,\n",
       "                        37.873531,\n",
       "                        202.87\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5185\\u8499\\u53e4\",\n",
       "                    \"value\": [\n",
       "                        111.765617,\n",
       "                        40.817498,\n",
       "                        744.68\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u8fbd\\u5b81\",\n",
       "                    \"value\": [\n",
       "                        123.42944,\n",
       "                        41.835441,\n",
       "                        299.77\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5409\\u6797\",\n",
       "                    \"value\": [\n",
       "                        125.32599,\n",
       "                        43.896536,\n",
       "                        464.95\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u9ed1\\u9f99\\u6c5f\",\n",
       "                    \"value\": [\n",
       "                        126.661669,\n",
       "                        45.742347,\n",
       "                        930.69\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u4e0a\\u6d77\",\n",
       "                    \"value\": [\n",
       "                        121.473701,\n",
       "                        31.230416,\n",
       "                        433.26\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u6c5f\\u82cf\",\n",
       "                    \"value\": [\n",
       "                        118.763232,\n",
       "                        32.061707,\n",
       "                        737.84\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u6d59\\u6c5f\",\n",
       "                    \"value\": [\n",
       "                        120.152791,\n",
       "                        30.267446,\n",
       "                        319.2\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5b89\\u5fbd\",\n",
       "                    \"value\": [\n",
       "                        117.284922,\n",
       "                        31.861184,\n",
       "                        466.33\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u798f\\u5efa\",\n",
       "                    \"value\": [\n",
       "                        119.295144,\n",
       "                        26.100779,\n",
       "                        493.26\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u6c5f\\u897f\",\n",
       "                    \"value\": [\n",
       "                        115.909228,\n",
       "                        28.675696,\n",
       "                        538.3\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5c71\\u4e1c\",\n",
       "                    \"value\": [\n",
       "                        117.020359,\n",
       "                        36.66853,\n",
       "                        210.0\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u6cb3\\u5357\",\n",
       "                    \"value\": [\n",
       "                        113.753602,\n",
       "                        34.765515,\n",
       "                        244.93\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u6e56\\u5317\",\n",
       "                    \"value\": [\n",
       "                        114.341861,\n",
       "                        30.546498,\n",
       "                        492.58\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u6e56\\u5357\",\n",
       "                    \"value\": [\n",
       "                        112.98381,\n",
       "                        28.112444,\n",
       "                        477.85\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5e7f\\u4e1c\",\n",
       "                    \"value\": [\n",
       "                        113.26653,\n",
       "                        23.132191,\n",
       "                        391.1\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5e7f\\u897f\",\n",
       "                    \"value\": [\n",
       "                        108.327546,\n",
       "                        22.815478,\n",
       "                        586.03\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u6d77\\u5357\",\n",
       "                    \"value\": [\n",
       "                        110.349228,\n",
       "                        20.017377,\n",
       "                        494.81\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u91cd\\u5e86\",\n",
       "                    \"value\": [\n",
       "                        106.551556,\n",
       "                        29.563009,\n",
       "                        252.8\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u56db\\u5ddd\",\n",
       "                    \"value\": [\n",
       "                        104.075931,\n",
       "                        30.651651,\n",
       "                        324.08\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u8d35\\u5dde\",\n",
       "                    \"value\": [\n",
       "                        106.70741,\n",
       "                        26.598194,\n",
       "                        290.12\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u4e91\\u5357\",\n",
       "                    \"value\": [\n",
       "                        102.710002,\n",
       "                        25.045806,\n",
       "                        327.22\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u897f\\u85cf\",\n",
       "                    \"value\": [\n",
       "                        91.117212,\n",
       "                        29.646922,\n",
       "                        940.77\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u9655\\u897f\",\n",
       "                    \"value\": [\n",
       "                        108.954239,\n",
       "                        34.265472,\n",
       "                        243.21\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u7518\\u8083\",\n",
       "                    \"value\": [\n",
       "                        103.826308,\n",
       "                        36.059421,\n",
       "                        443.47\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u9752\\u6d77\",\n",
       "                    \"value\": [\n",
       "                        101.780199,\n",
       "                        36.620901,\n",
       "                        433.08\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u5b81\\u590f\",\n",
       "                    \"value\": [\n",
       "                        106.258754,\n",
       "                        38.471317,\n",
       "                        974.28\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u65b0\\u7586\",\n",
       "                    \"value\": [\n",
       "                        87.627704,\n",
       "                        43.793026,\n",
       "                        2280.78\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u53f0\\u6e7e\",\n",
       "                    \"value\": [\n",
       "                        121.509062,\n",
       "                        25.044332,\n",
       "                        0.0\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            },\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            }\n",
       "        }\n",
       "    ],\n",
       "    \"legend\": [\n",
       "        {\n",
       "            \"data\": [\n",
       "                \"\\u4eba\\u5747\\u7528\\u6c34\\u91cf\"\n",
       "            ],\n",
       "            \"selected\": {\n",
       "                \"\\u4eba\\u5747\\u7528\\u6c34\\u91cf\": true\n",
       "            },\n",
       "            \"show\": true\n",
       "        }\n",
       "    ],\n",
       "    \"tooltip\": {\n",
       "        \"show\": true,\n",
       "        \"trigger\": \"item\",\n",
       "        \"triggerOn\": \"mousemove|click\",\n",
       "        \"axisPointer\": {\n",
       "            \"type\": \"line\"\n",
       "        },\n",
       "        \"formatter\": function (params) {        return params.name + ' : ' + params.value[2];    },\n",
       "        \"textStyle\": {\n",
       "            \"fontSize\": 14\n",
       "        },\n",
       "        \"borderWidth\": 0\n",
       "    },\n",
       "    \"title\": [\n",
       "        {\n",
       "            \"text\": \"\\u4e2d\\u56fd\\u5206\\u7701\\u4eba\\u5747\\u7528\\u6c34\\u91cf\\u6570\\u636e\"\n",
       "        }\n",
       "    ],\n",
       "    \"visualMap\": {\n",
       "        \"show\": true,\n",
       "        \"type\": \"continuous\",\n",
       "        \"min\": 20,\n",
       "        \"max\": 1000,\n",
       "        \"inRange\": {\n",
       "            \"color\": [\n",
       "                \"#50a3ba\",\n",
       "                \"#eac763\",\n",
       "                \"#d94e5d\"\n",
       "            ]\n",
       "        },\n",
       "        \"calculable\": true,\n",
       "        \"splitNumber\": 5,\n",
       "        \"orient\": \"vertical\",\n",
       "        \"showLabel\": true\n",
       "    },\n",
       "    \"geo\": {\n",
       "        \"map\": \"china\",\n",
       "        \"roam\": true,\n",
       "        \"emphasis\": {}\n",
       "    }\n",
       "};\n",
       "                chart_593879929e1949a5b23480b612b8fd2e.setOption(option_593879929e1949a5b23480b612b8fd2e);\n",
       "        });\n",
       "    </script>\n"
      ],
      "text/plain": [
       "<pyecharts.render.display.HTML at 0x20a857e2a58>"
      ]
     },
     "execution_count": 760,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "from pyecharts import options as opts\n",
    "from pyecharts.charts import Geo\n",
    "from pyecharts.globals import ChartType, SymbolType\n",
    "\n",
    "\n",
    "def geo_人均用水量() -> Geo:\n",
    "    c = (\n",
    "        Geo()\n",
    "        .add_schema(maptype=\"china\")\n",
    "        .add(\"人均用水量\", 人均用水量)\n",
    "        .set_series_opts(label_opts=opts.LabelOpts(is_show=False))\n",
    "        .set_global_opts(\n",
    "            visualmap_opts=opts.VisualMapOpts(min_=20,max_=1000),\n",
    "            title_opts=opts.TitleOpts(title=\"中国分省人均用水量数据\"),\n",
    "        )\n",
    "    )\n",
    "    return c\n",
    "分省人均用水量地理图 = geo_人均用水量()\n",
    "分省人均用水量地理图.render_notebook()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "* 根据中国分省人均用水量地图可看出辽宁到云南一带人均用水量较少"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 740,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "89705.23"
      ]
     },
     "execution_count": 740,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.GDP.max()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 741,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "1310.92"
      ]
     },
     "execution_count": 741,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.GDP.min()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 742,
   "metadata": {},
   "outputs": [],
   "source": [
    "from pyecharts.faker import Faker\n",
    "from pyecharts import options as opts\n",
    "from pyecharts.charts import Bar, Grid, Line,Scatter\n",
    "def grid_mutil_yaxis() -> Grid:\n",
    "    x_data = ['北京', '天津', '河北', '山西', '内蒙古', '辽宁', '吉林', '黑龙江', '上海', '江苏', '浙江', '安徽', '福建', '江西', '山东', '河南', '湖北', '湖南', '广东', '广西', '海南', '重庆', '四川', '贵州', '云南', '西藏', '陕西', '甘肃', '青海', '宁夏', '新疆','台湾']\n",
    "    bar = (\n",
    "        Bar()\n",
    "        .add_xaxis(x_data)\n",
    "        .add_yaxis(\n",
    "            \"供/用水总量(亿/立方米)\",用水总量,\n",
    "            color=\"#5793f3\",\n",
    "        )\n",
    "     \n",
    "        .extend_axis(\n",
    "            yaxis=opts.AxisOpts(\n",
    "                name=\"供/用水总量(亿/立方米)\",\n",
    "                type_=\"value\",\n",
    "                min_=0,\n",
    "                max_=600,\n",
    "                position=\"right\",\n",
    "                axisline_opts=opts.AxisLineOpts(\n",
    "                    linestyle_opts=opts.LineStyleOpts(color=\"#675bba\")\n",
    "                ),\n",
    "                axislabel_opts=opts.LabelOpts(formatter=\"{value} 亿/立方米\"),\n",
    "            )\n",
    "        )\n",
    "        .extend_axis(\n",
    "            yaxis=opts.AxisOpts(\n",
    "                type_=\"value\",\n",
    "                name=\"GDP(亿元)\",\n",
    "                min_=0,\n",
    "                max_=100000,\n",
    "                position=\"left\",\n",
    "                axisline_opts=opts.AxisLineOpts(\n",
    "                    linestyle_opts=opts.LineStyleOpts(color=\"#d14a61\")\n",
    "                ),\n",
    "                axislabel_opts=opts.LabelOpts(formatter=\"{value}亿元 \"),\n",
    "                splitline_opts=opts.SplitLineOpts(\n",
    "                    is_show=True, linestyle_opts=opts.LineStyleOpts(opacity=1)\n",
    "                ),\n",
    "            )\n",
    "        )\n",
    "   .set_global_opts(\n",
    "            yaxis_opts=opts.AxisOpts(\n",
    "                name=\"供/用水总量(亿/立方米)\",\n",
    "                min_=0,\n",
    "                max_=600,\n",
    "                position=\"right\",\n",
    "              \n",
    "                axisline_opts=opts.AxisLineOpts(\n",
    "                    linestyle_opts=opts.LineStyleOpts(color=\"#5793f3\")\n",
    "                ),\n",
    "                axislabel_opts=opts.LabelOpts(formatter=\"{value} 亿/立方米\"),\n",
    "            ),\n",
    "            title_opts=opts.TitleOpts(title=\"供用水与GDP\"),\n",
    "            tooltip_opts=opts.TooltipOpts(trigger=\"axis\", axis_pointer_type=\"cross\"),\n",
    "        )\n",
    "    )\n",
    "    line = (\n",
    "        Line()\n",
    "        .add_xaxis(x_data)\n",
    "        .add_yaxis(\n",
    "            \"GDP(亿元)\",\n",
    "             GDP,\n",
    "             yaxis_index=2,\n",
    "            color=\"#675bba\",\n",
    "            label_opts=opts.LabelOpts(is_show=False),\n",
    "        )\n",
    "    )\n",
    "\n",
    "    bar.overlap(line)\n",
    "    return Grid().add(bar, opts.GridOpts(pos_left=\"10%\", pos_right=\"20%\"), is_control_axis_index=True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 743,
   "metadata": {
    "scrolled": false
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "\n",
       "<script>\n",
       "    require.config({\n",
       "        paths: {\n",
       "            'echarts':'https://assets.pyecharts.org/assets/echarts.min'\n",
       "        }\n",
       "    });\n",
       "</script>\n",
       "\n",
       "        <div id=\"326dee9b09234f319a300a7864551d8f\" style=\"width:900px; height:500px;\"></div>\n",
       "\n",
       "<script>\n",
       "        require(['echarts'], function(echarts) {\n",
       "                var chart_326dee9b09234f319a300a7864551d8f = echarts.init(\n",
       "                    document.getElementById('326dee9b09234f319a300a7864551d8f'), 'white', {renderer: 'canvas'});\n",
       "                var option_326dee9b09234f319a300a7864551d8f = {\n",
       "    \"animation\": true,\n",
       "    \"animationThreshold\": 2000,\n",
       "    \"animationDuration\": 1000,\n",
       "    \"animationEasing\": \"cubicOut\",\n",
       "    \"animationDelay\": 0,\n",
       "    \"animationDurationUpdate\": 300,\n",
       "    \"animationEasingUpdate\": \"cubicOut\",\n",
       "    \"animationDelayUpdate\": 0,\n",
       "    \"color\": [\n",
       "        \"#5793f3\",\n",
       "        \"#c23531\",\n",
       "        \"#2f4554\",\n",
       "        \"#61a0a8\",\n",
       "        \"#d48265\",\n",
       "        \"#749f83\",\n",
       "        \"#ca8622\",\n",
       "        \"#bda29a\",\n",
       "        \"#6e7074\",\n",
       "        \"#546570\",\n",
       "        \"#c4ccd3\",\n",
       "        \"#f05b72\",\n",
       "        \"#ef5b9c\",\n",
       "        \"#f47920\",\n",
       "        \"#905a3d\",\n",
       "        \"#fab27b\",\n",
       "        \"#2a5caa\",\n",
       "        \"#444693\",\n",
       "        \"#726930\",\n",
       "        \"#b2d235\",\n",
       "        \"#6d8346\",\n",
       "        \"#ac6767\",\n",
       "        \"#1d953f\",\n",
       "        \"#6950a1\",\n",
       "        \"#918597\"\n",
       "    ],\n",
       "    \"series\": [\n",
       "        {\n",
       "            \"type\": \"bar\",\n",
       "            \"name\": \"\\u4f9b/\\u7528\\u6c34\\u603b\\u91cf(\\u4ebf/\\u7acb\\u65b9\\u7c73)\",\n",
       "            \"data\": [\n",
       "                39.5,\n",
       "                27.5,\n",
       "                181.6,\n",
       "                74.9,\n",
       "                188.0,\n",
       "                131.1,\n",
       "                126.7,\n",
       "                353.1,\n",
       "                104.8,\n",
       "                591.3,\n",
       "                179.5,\n",
       "                290.3,\n",
       "                192.0,\n",
       "                248.0,\n",
       "                209.5,\n",
       "                233.8,\n",
       "                290.3,\n",
       "                326.9,\n",
       "                433.5,\n",
       "                284.9,\n",
       "                45.6,\n",
       "                77.4,\n",
       "                268.4,\n",
       "                103.5,\n",
       "                156.6,\n",
       "                31.4,\n",
       "                93.0,\n",
       "                116.1,\n",
       "                25.8,\n",
       "                66.1,\n",
       "                552.3,\n",
       "                0.0\n",
       "            ],\n",
       "            \"barCategoryGap\": \"20%\",\n",
       "            \"label\": {\n",
       "                \"show\": true,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"line\",\n",
       "            \"name\": \"GDP(\\u4ebf\\u5143)\",\n",
       "            \"connectNulls\": false,\n",
       "            \"yAxisIndex\": 2,\n",
       "            \"symbolSize\": 4,\n",
       "            \"showSymbol\": true,\n",
       "            \"smooth\": false,\n",
       "            \"step\": false,\n",
       "            \"data\": [\n",
       "                [\n",
       "                    \"\\u5317\\u4eac\",\n",
       "                    28014.94\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u5929\\u6d25\",\n",
       "                    18549.19\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u6cb3\\u5317\",\n",
       "                    34016.32\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u5c71\\u897f\",\n",
       "                    15528.42\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u5185\\u8499\\u53e4\",\n",
       "                    16096.21\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u8fbd\\u5b81\",\n",
       "                    23409.24\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u5409\\u6797\",\n",
       "                    14944.53\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u9ed1\\u9f99\\u6c5f\",\n",
       "                    15902.68\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u4e0a\\u6d77\",\n",
       "                    30632.99\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u6c5f\\u82cf\",\n",
       "                    85869.76\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u6d59\\u6c5f\",\n",
       "                    51768.26\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u5b89\\u5fbd\",\n",
       "                    27018.0\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u798f\\u5efa\",\n",
       "                    32182.09\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u6c5f\\u897f\",\n",
       "                    20006.31\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u5c71\\u4e1c\",\n",
       "                    72634.15\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u6cb3\\u5357\",\n",
       "                    44552.83\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u6e56\\u5317\",\n",
       "                    35478.09\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u6e56\\u5357\",\n",
       "                    33902.96\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u5e7f\\u4e1c\",\n",
       "                    89705.23\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u5e7f\\u897f\",\n",
       "                    18523.26\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u6d77\\u5357\",\n",
       "                    4462.54\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u91cd\\u5e86\",\n",
       "                    19424.73\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u56db\\u5ddd\",\n",
       "                    36980.22\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u8d35\\u5dde\",\n",
       "                    13540.83\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u4e91\\u5357\",\n",
       "                    16376.34\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u897f\\u85cf\",\n",
       "                    1310.92\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u9655\\u897f\",\n",
       "                    21898.81\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u7518\\u8083\",\n",
       "                    7459.9\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u9752\\u6d77\",\n",
       "                    2624.83\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u5b81\\u590f\",\n",
       "                    3443.56\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u65b0\\u7586\",\n",
       "                    10881.96\n",
       "                ],\n",
       "                [\n",
       "                    \"\\u53f0\\u6e7e\",\n",
       "                    0.0\n",
       "                ]\n",
       "            ],\n",
       "            \"hoverAnimation\": true,\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            },\n",
       "            \"lineStyle\": {\n",
       "                \"width\": 1,\n",
       "                \"opacity\": 1,\n",
       "                \"curveness\": 0,\n",
       "                \"type\": \"solid\"\n",
       "            },\n",
       "            \"areaStyle\": {\n",
       "                \"opacity\": 0\n",
       "            }\n",
       "        }\n",
       "    ],\n",
       "    \"legend\": [\n",
       "        {\n",
       "            \"data\": [\n",
       "                \"\\u4f9b/\\u7528\\u6c34\\u603b\\u91cf(\\u4ebf/\\u7acb\\u65b9\\u7c73)\",\n",
       "                \"GDP(\\u4ebf\\u5143)\"\n",
       "            ],\n",
       "            \"selected\": {\n",
       "                \"\\u4f9b/\\u7528\\u6c34\\u603b\\u91cf(\\u4ebf/\\u7acb\\u65b9\\u7c73)\": true\n",
       "            },\n",
       "            \"show\": true\n",
       "        }\n",
       "    ],\n",
       "    \"tooltip\": {\n",
       "        \"show\": true,\n",
       "        \"trigger\": \"axis\",\n",
       "        \"triggerOn\": \"mousemove|click\",\n",
       "        \"axisPointer\": {\n",
       "            \"type\": \"cross\"\n",
       "        },\n",
       "        \"textStyle\": {\n",
       "            \"fontSize\": 14\n",
       "        },\n",
       "        \"borderWidth\": 0\n",
       "    },\n",
       "    \"xAxis\": [\n",
       "        {\n",
       "            \"show\": true,\n",
       "            \"scale\": false,\n",
       "            \"nameLocation\": \"end\",\n",
       "            \"nameGap\": 15,\n",
       "            \"gridIndex\": 0,\n",
       "            \"inverse\": false,\n",
       "            \"offset\": 0,\n",
       "            \"splitNumber\": 5,\n",
       "            \"minInterval\": 0,\n",
       "            \"splitLine\": {\n",
       "                \"show\": false,\n",
       "                \"lineStyle\": {\n",
       "                    \"width\": 1,\n",
       "                    \"opacity\": 1,\n",
       "                    \"curveness\": 0,\n",
       "                    \"type\": \"solid\"\n",
       "                }\n",
       "            },\n",
       "            \"data\": [\n",
       "                \"\\u5317\\u4eac\",\n",
       "                \"\\u5929\\u6d25\",\n",
       "                \"\\u6cb3\\u5317\",\n",
       "                \"\\u5c71\\u897f\",\n",
       "                \"\\u5185\\u8499\\u53e4\",\n",
       "                \"\\u8fbd\\u5b81\",\n",
       "                \"\\u5409\\u6797\",\n",
       "                \"\\u9ed1\\u9f99\\u6c5f\",\n",
       "                \"\\u4e0a\\u6d77\",\n",
       "                \"\\u6c5f\\u82cf\",\n",
       "                \"\\u6d59\\u6c5f\",\n",
       "                \"\\u5b89\\u5fbd\",\n",
       "                \"\\u798f\\u5efa\",\n",
       "                \"\\u6c5f\\u897f\",\n",
       "                \"\\u5c71\\u4e1c\",\n",
       "                \"\\u6cb3\\u5357\",\n",
       "                \"\\u6e56\\u5317\",\n",
       "                \"\\u6e56\\u5357\",\n",
       "                \"\\u5e7f\\u4e1c\",\n",
       "                \"\\u5e7f\\u897f\",\n",
       "                \"\\u6d77\\u5357\",\n",
       "                \"\\u91cd\\u5e86\",\n",
       "                \"\\u56db\\u5ddd\",\n",
       "                \"\\u8d35\\u5dde\",\n",
       "                \"\\u4e91\\u5357\",\n",
       "                \"\\u897f\\u85cf\",\n",
       "                \"\\u9655\\u897f\",\n",
       "                \"\\u7518\\u8083\",\n",
       "                \"\\u9752\\u6d77\",\n",
       "                \"\\u5b81\\u590f\",\n",
       "                \"\\u65b0\\u7586\",\n",
       "                \"\\u53f0\\u6e7e\"\n",
       "            ]\n",
       "        }\n",
       "    ],\n",
       "    \"yAxis\": [\n",
       "        {\n",
       "            \"name\": \"\\u4f9b/\\u7528\\u6c34\\u603b\\u91cf(\\u4ebf/\\u7acb\\u65b9\\u7c73)\",\n",
       "            \"show\": true,\n",
       "            \"scale\": false,\n",
       "            \"nameLocation\": \"end\",\n",
       "            \"nameGap\": 15,\n",
       "            \"gridIndex\": 0,\n",
       "            \"axisLine\": {\n",
       "                \"show\": true,\n",
       "                \"onZero\": true,\n",
       "                \"onZeroAxisIndex\": 0,\n",
       "                \"lineStyle\": {\n",
       "                    \"width\": 1,\n",
       "                    \"opacity\": 1,\n",
       "                    \"curveness\": 0,\n",
       "                    \"type\": \"solid\",\n",
       "                    \"color\": \"#5793f3\"\n",
       "                }\n",
       "            },\n",
       "            \"axisLabel\": {\n",
       "                \"show\": true,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8,\n",
       "                \"formatter\": \"{value} \\u4ebf/\\u7acb\\u65b9\\u7c73\"\n",
       "            },\n",
       "            \"inverse\": false,\n",
       "            \"position\": \"right\",\n",
       "            \"offset\": 0,\n",
       "            \"splitNumber\": 5,\n",
       "            \"min\": 0,\n",
       "            \"max\": 600,\n",
       "            \"minInterval\": 0,\n",
       "            \"splitLine\": {\n",
       "                \"show\": false,\n",
       "                \"lineStyle\": {\n",
       "                    \"width\": 1,\n",
       "                    \"opacity\": 1,\n",
       "                    \"curveness\": 0,\n",
       "                    \"type\": \"solid\"\n",
       "                }\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"value\",\n",
       "            \"name\": \"\\u4f9b/\\u7528\\u6c34\\u603b\\u91cf(\\u4ebf/\\u7acb\\u65b9\\u7c73)\",\n",
       "            \"show\": true,\n",
       "            \"scale\": false,\n",
       "            \"nameLocation\": \"end\",\n",
       "            \"nameGap\": 15,\n",
       "            \"gridIndex\": 0,\n",
       "            \"axisLine\": {\n",
       "                \"show\": true,\n",
       "                \"onZero\": true,\n",
       "                \"onZeroAxisIndex\": 0,\n",
       "                \"lineStyle\": {\n",
       "                    \"width\": 1,\n",
       "                    \"opacity\": 1,\n",
       "                    \"curveness\": 0,\n",
       "                    \"type\": \"solid\",\n",
       "                    \"color\": \"#675bba\"\n",
       "                }\n",
       "            },\n",
       "            \"axisLabel\": {\n",
       "                \"show\": true,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8,\n",
       "                \"formatter\": \"{value} \\u4ebf/\\u7acb\\u65b9\\u7c73\"\n",
       "            },\n",
       "            \"inverse\": false,\n",
       "            \"position\": \"right\",\n",
       "            \"offset\": 0,\n",
       "            \"splitNumber\": 5,\n",
       "            \"min\": 0,\n",
       "            \"max\": 600,\n",
       "            \"minInterval\": 0,\n",
       "            \"splitLine\": {\n",
       "                \"show\": false,\n",
       "                \"lineStyle\": {\n",
       "                    \"width\": 1,\n",
       "                    \"opacity\": 1,\n",
       "                    \"curveness\": 0,\n",
       "                    \"type\": \"solid\"\n",
       "                }\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"value\",\n",
       "            \"name\": \"GDP(\\u4ebf\\u5143)\",\n",
       "            \"show\": true,\n",
       "            \"scale\": false,\n",
       "            \"nameLocation\": \"end\",\n",
       "            \"nameGap\": 15,\n",
       "            \"gridIndex\": 0,\n",
       "            \"axisLine\": {\n",
       "                \"show\": true,\n",
       "                \"onZero\": true,\n",
       "                \"onZeroAxisIndex\": 0,\n",
       "                \"lineStyle\": {\n",
       "                    \"width\": 1,\n",
       "                    \"opacity\": 1,\n",
       "                    \"curveness\": 0,\n",
       "                    \"type\": \"solid\",\n",
       "                    \"color\": \"#d14a61\"\n",
       "                }\n",
       "            },\n",
       "            \"axisLabel\": {\n",
       "                \"show\": true,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8,\n",
       "                \"formatter\": \"{value}\\u4ebf\\u5143 \"\n",
       "            },\n",
       "            \"inverse\": false,\n",
       "            \"position\": \"left\",\n",
       "            \"offset\": 0,\n",
       "            \"splitNumber\": 5,\n",
       "            \"min\": 0,\n",
       "            \"max\": 100000,\n",
       "            \"minInterval\": 0,\n",
       "            \"splitLine\": {\n",
       "                \"show\": true,\n",
       "                \"lineStyle\": {\n",
       "                    \"width\": 1,\n",
       "                    \"opacity\": 1,\n",
       "                    \"curveness\": 0,\n",
       "                    \"type\": \"solid\"\n",
       "                }\n",
       "            }\n",
       "        }\n",
       "    ],\n",
       "    \"title\": [\n",
       "        {\n",
       "            \"text\": \"\\u4f9b\\u7528\\u6c34\\u4e0eGDP\"\n",
       "        }\n",
       "    ],\n",
       "    \"grid\": [\n",
       "        {\n",
       "            \"left\": \"10%\",\n",
       "            \"right\": \"20%\"\n",
       "        }\n",
       "    ]\n",
       "};\n",
       "                chart_326dee9b09234f319a300a7864551d8f.setOption(option_326dee9b09234f319a300a7864551d8f);\n",
       "        });\n",
       "    </script>\n"
      ],
      "text/plain": [
       "<pyecharts.render.display.HTML at 0x20a857edb38>"
      ]
     },
     "execution_count": 743,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "S =  grid_mutil_yaxis()\n",
    "S.render_notebook()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "* 根据上图可知供水用水量与GDP存在一定的正相关关系，说明水资源对生产具有重要影响\n",
    "* 但在京津地区和新疆省表现不明显，证明供水用水还受自然、政策等因素影响"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 结论\n",
    "* 中国北方各省水资源比南方短缺，尤其是华北人口集聚和西北干旱一带\n",
    "* 水资源丰富地区供水量大，人均用水量少，证明该地区水资源未能充分利用，该地区GDP总值较低，如：云南、新疆、西藏等\n",
    "* 根据供水与水资源的图表结合水资源地图及人均用水图表，可看出我国水资源分布受气候因素影响大\n",
    "* 根据中国分省人均用水量地图可看出辽宁到云南一带人均用水量较少\n",
    "* 根据供用水与GDP的图表可知供水用水量与GDP存在一定的正相关关系，说明水资源对生产具有重要影响\n",
    "* 供水用水与GDP在京津地区和西部省份呈负相关，证明供水用水对国民生产受自然、政策等其他特殊因素影响"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.0"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
